@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap");

:root{
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --primary: #0F2A44;
  --secondary: #2563EB;
  --accent: #22C55E;
  --text: #0F172A;
  --muted: #64748B;
  --border: #E2E8F0;

  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 8px 22px rgba(15, 23, 42, 0.06);

  --radius: 14px;
}

*{ box-sizing:border-box; }
html, body{ height: 100%; }

body{
  margin:0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* =========================
   Top (global) header
========================= */
.topbar{
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(248,250,252,.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner{
  max-width: 1400px;
  margin: 0 auto;
  padding: 12px 16px;
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}

.title{
  font-weight: 800;
  font-size: 16px;
  margin-right:auto;
  display:flex;
  align-items:baseline;
  gap:10px;
}

.subtitle{
  font-weight: 500;
  color: var(--muted);
  font-size: 12px;
}

.tabs{ display:flex; gap:8px; align-items:center; }

.tab{
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  cursor:pointer;
  transition: transform 120ms ease, background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.tab:hover{
  border-color: rgba(37,99,235,.35);
  transform: translateY(-1px);
}

.tab[aria-selected="true"]{
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* =========================
   Main / panels
========================= */
main{ max-width: 1400px; margin: 0 auto; padding: 16px; }
.panel{ display:none; }
.panel.is-active{ display:block; }

/* =========================
   Report shell
========================= */
.report-canvas{
  background: transparent;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.report-inner{
  padding: 18px;
  min-height: 70vh;
}

/* =========================
   Dashboard header strip (lighter + shorter)
========================= */
.report-headerbar{
  background: #102E4B;
  color: #fff;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255,255,255,.10);
}

.headerbar-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
}

.headerbar-title{
  text-align:center;
  flex: 1;
  font-weight: 800;
  letter-spacing: .2px;
  text-transform: uppercase;
  font-size: 14px;
  line-height: 1.1;
}

.headerbar-title small{
  display:block;
  margin-top: 4px;
  font-weight: 500;
  color: rgba(255,255,255,.78);
  text-transform:none;
  letter-spacing: 0;
  font-size: 12px;
}

.headerbar-logo{
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.16);
  filter: grayscale(.25) saturate(.85);
  opacity: .95;
}

/* =========================
   Layout
========================= */
.top-grid{
  display:grid;
  grid-template-columns: 310px 1fr;
  gap: 16px;
  align-items:start;
  margin-top: 14px;
}

@media(max-width: 1100px){
  .top-grid{ grid-template-columns: 1fr; }
}

/* =========================
   Cards
========================= */
.frame-card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: var(--shadow);
}

/* =========================
   Filters panel + Collapsible header
========================= */
.control-card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: var(--shadow);
}

.control-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.control-head-title{
  font-weight: 700;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .5px;
}

.control-toggle{
  display:none; /* shown on mobile */
  border: 1px solid transparent;
  background: rgba(37,99,235,.10);
  color: var(--secondary);
  padding: 7px 10px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 12px;
  cursor:pointer;
  transition: transform 120ms ease, background-color 120ms ease;
}

.control-toggle:hover{
  background: rgba(37,99,235,.16);
  transform: translateY(-1px);
}

.control-body{
  overflow: hidden;
}

/* Collapse behavior (mobile) */
@media(max-width: 900px){
  .control-toggle{ display:inline-flex; align-items:center; gap:8px; }
  .control-card.is-collapsed .control-body{
    max-height: 0;
  }
  .control-card:not(.is-collapsed) .control-body{
    max-height: 900px;
  }
  .control-body{
    transition: max-height 260ms ease;
  }
}

/* Filters grid */
.control-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.control-grid-single{ grid-template-columns: 1fr; }


.field label{
  display:block;
  font-weight: 500;
  font-size: 11px;
  margin-bottom: 4px;
  color: var(--muted);
}

.field .ghost{ opacity: 0; }

.field select,
.field input{
  width: 100%;
  padding: 9px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: #F1F5F9;
  font-weight: 600;
  font-size: 12px;
  color: var(--text);
  transition: border-color 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}

.field select:focus,
.field input:focus{
  outline: none;
  background: #FFFFFF;
  border-color: rgba(37,99,235,.55);
  box-shadow: 0 0 0 4px rgba(37,99,235,.14);
}

.field.actions{
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
}

.btn-row{
  display:flex;
  gap:8px;
  justify-content:flex-end;
}

.mini-btn{
  border: 1px solid transparent;
  background: rgba(37,99,235,.10);
  color: var(--secondary);
  padding: 8px 10px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 12px;
  cursor:pointer;
  transition: transform 120ms ease, background-color 120ms ease;
}

.mini-btn:hover{
  background: rgba(37,99,235,.22);
  border-color: rgba(37,99,235,.18);
  transform: translateY(-1px);
}

.mini-btn:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px rgba(37,99,235,.18);
}

.mini-btn.is-active{
  background: rgba(37,99,235,.28);
  border-color: rgba(37,99,235,.30);
  box-shadow: 0 6px 14px rgba(2, 6, 23, .08);
}

/* Exclude block */
.exclude-compact{
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.exclude-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom: 8px;
}

.exclude-title{
  font-weight: 600;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .4px;
}

.link-btn{
  background: transparent;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 12px;
  color: var(--secondary);
}

.link-btn:hover{ text-decoration: underline; }

.exclude-row{ display:flex; flex-direction:column; gap:8px; }

/* Expanders (Calendar / Exclude) - keeps existing look */
.expander:not(.exclude-compact){
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.expander-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom: 8px;
}

.expander-title{
  font-weight: 600;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .4px;
}

.expander-actions{
  display:flex;
  align-items:center;
  gap: 10px;
}

.exclude-pick{
  width:100%;
  padding: 9px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: #F1F5F9;
  font-weight: 600;
  font-size: 12px;
  color: var(--text);
}

.chips{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}

.chip{
  display:flex;
  align-items:center;
  gap:6px;
  border: 1px solid var(--border);
  background: #FFFFFF;
  border-radius: 999px;
  padding: 4px 8px;
  font-weight: 600;
  font-size: 11px;
  color: var(--text);
}

.chip button{
  border:none;
  background:transparent;
  cursor:pointer;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  color: var(--muted);
}

.chip button:hover{ color: var(--text); }

/* =========================
   Status blocks
========================= */
.status-strip.framed{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items:stretch;
}

@media(max-width: 1200px){
  .status-strip.framed{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media(max-width: 650px){
  .status-strip.framed{ grid-template-columns: 1fr; }
}

.status-block{
  text-align:center;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  min-height: 170px;
}

.status-title{
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--text);
  margin-top: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 18px;
  width: 100%;
}





.status-center{
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 8px 0 6px;
}


.status-bottom{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  width: 200px;
  margin: 0 auto;
  padding-top: 6px;
}

.stat-label{
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.stat-value{
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}


/* Emoji: reduced dominance */
.emoji{
  width: 58px;
  height: 58px;
  border-radius: 999px;
  display:grid;
  place-items:center;
  font-size: 34px;
  border: 1px solid rgba(226,232,240,.95);
  background: #FFFFFF;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

/* Battery */
.battery{
  width: 62px;
  height: 88px;
  border: 2px solid rgba(15,42,68,.55);
  border-radius: 12px;
  position: relative;
  background: #F1F5F9;
  padding: 8px;
  transform: translateY(6px);
}

.battery:before{
  content:"";
  position:absolute;
  top:-10px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 10px;
  border: 2px solid rgba(15,42,68,.55);
  border-bottom: none;
  border-radius: 9px 9px 0 0;
  background: #F1F5F9;
}

.battery-bars{
  display:grid;
  grid-template-rows: 1fr 1fr 1fr;
  gap: 6px;
  height: 100%;
}

.bar{ border-radius: 6px; background: #CBD5E1; }
.bar.on{ background: var(--accent); }


/* =========================
   Dashboard compact metric rows (RPE / sRPE cards)
========================= */
.metric-rows{
  display:flex;
  flex-direction:column;
  gap: 8px;
  width: 100%;
  padding: 6px 6px 2px;
}

.metric-row{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap: 8px;
  width: 100%;
  max-width: 240px;
  margin: 0 auto;
}

.metric-row .label{
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.metric-row .value{
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}


.metric-icon{
  width: 58px;
  height: 58px;
  border-radius: 999px;
  display:grid;
  place-items:center;
  border: 1px solid rgba(226,232,240,.95);
  background: #FFFFFF;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.metric-icon svg{
  width: 34px;
  height: 34px;
}

/* =========================
   Tables + Sticky first column + Zebra
========================= */
.table-wrap{
  margin-top: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  max-height: 70vh;
  overflow-x: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

table{
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  min-width: 980px;
  font-size: 12.5px;
}

thead th{
  position: sticky;
  top: 0;
  white-space: normal;
  word-break: break-word;
  background: var(--primary);
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.12);
  padding: 10px 8px;
  text-align:center;
  font-weight: 700;
  white-space: nowrap;
  z-index: 5;
}

/* Sticky first column (header + body) */
thead th:first-child{
  position: sticky;
  left: 0;
  z-index: 8;
  box-shadow: 6px 0 0 rgba(0,0,0,0); /* keeps layout stable */
}

tbody td{
  border-top: 1px solid var(--border);
  padding: 9px 8px;
  background: var(--surface);
  vertical-align: top;
  color: var(--text);
}

/* Zebra rows (do not touch heatmap cells) */
tbody tr:nth-child(even) td:not(.heat){
  background: #F8FAFC;
}

/* Hover (do not touch heatmap cells) */
tbody tr:hover td:not(.heat){
  background: #EEF2F7;
}

/* Sticky first column body */
tbody td:first-child{
  position: sticky;
  left: 0;
  z-index: 4;
  background: var(--surface);
  font-weight: 700;
  box-shadow: 8px 0 16px rgba(15,23,42,.06);
}

/* Keep zebra on sticky col too */
tbody tr:nth-child(even) td:first-child{ background: #F8FAFC; }
tbody tr:hover td:first-child{ background: #EEF2F7; }

/* Basic types */
tbody td.center{ text-align:center; font-weight: 600; }
tbody td.name{ font-weight: 700; }
tbody td.date{ font-weight: 600; white-space: nowrap; }

/* Heat cells: DO NOT override inline heat colors */
.heat{
  font-weight: 700;
  text-align:center;
  transition: background-color 220ms ease, color 220ms ease;
}

/* Comment column sizing */
.dash-table th:nth-child(8),
.dash-table td:nth-child(8){
  width: 340px;
  max-width: 420px;
  min-width: 280px;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.25;
}

/* =========================
   Load KPIs
========================= */
.kpi-strip{
  display:flex;
  gap: 12px;
  align-items:stretch;
  justify-content:center;
}

.kpi-card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  min-width: 170px;
  text-align:center;
  box-shadow: var(--shadow);
}

.kpi-card-title{
  font-weight: 500;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .4px;
}

.kpi-card-value{
  font-weight: 800;
  font-size: 26px;
  margin-top: 6px;
  color: var(--text);
}

#panel-load .report-inner{
  min-height: auto !important;
}

/* =========================
   Chart card
========================= */
.card{
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow:hidden;
  box-shadow: var(--shadow);
}

.card header{
  padding: 12px 14px;
  font-weight: 700;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  color: var(--text);
}

.muted{ color: var(--muted); font-weight:500; }

.chart-frame{
  position:relative;
  width:100%;
  height: 82vh;
  background: var(--surface);
}

.chart-frame iframe{
  position:absolute; inset:0; width:100%; height:100%; border:0;
}

@media(max-width:768px){
  .chart-frame{ height: 92vh; }
}

/* ===============================
   Simple password gate overlay
   (doesn't change underlying layout)
   =============================== */
#authOverlay{
  position: fixed;
  inset: 0;
  background: rgba(8, 20, 36, 0.78);
  backdrop-filter: blur(6px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
#authOverlay.is-open{ display: flex; }

#authCard{
  width: min(420px, 92vw);
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 18px 60px rgba(0,0,0,0.35);
  padding: 22px 22px 18px;
}
#authCard h2{
  margin: 0 0 8px;
  font-size: 18px;
  letter-spacing: 0.2px;
  color: #0B2540;
}
#authCard p{
  margin: 0 0 14px;
  color: #35516b;
  font-size: 13px;
  line-height: 1.35;
}
#authRow{
  display: flex;
  gap: 10px;
  align-items: center;
}
#authPassword{
  flex: 1;
  height: 40px;
  border-radius: 12px;
  border: 1px solid #d7e2ee;
  padding: 0 12px;
  outline: none;
  font-size: 14px;
}
#authPassword:focus{
  border-color: #9db7d3;
  box-shadow: 0 0 0 3px rgba(66,125,186,0.18);
}
#authBtn{
  height: 40px;
  border-radius: 12px;
  border: 0;
  padding: 0 14px;
  background: #0B2540;
  color: white;
  cursor: pointer;
  font-weight: 600;
}
#authError{
  min-height: 16px;
  margin-top: 10px;
  color: #b42318;
  font-size: 12px;
}

/* =========================
   Mobile polish (additive)
   - Keeps desktop design the same
========================= */

@media (max-width: 900px){
  main{ padding: 12px; }
  .report-inner{ padding: 14px; }
  .topbar-inner{ padding: 10px 12px; }
}

@media (max-width: 650px){
  .title{ font-size: 15px; }
  .subtitle{ display:none; }

  .tabs{ width: 100%; overflow-x: auto; padding-bottom: 4px; }
  .tab{ flex: 0 0 auto; }

  .report-headerbar{ padding: 10px 10px; }
  .headerbar-title{ font-size: 13px; }
  .headerbar-title small{ font-size: 11px; }

  .control-card, .frame-card{ padding: 12px; }

  /* Make quick buttons easier to tap */
  .mini-btn{ padding: 10px 14px; }

  /* Table: keep scroll, slightly smaller min width so it feels less "stuck" */
  table{ min-width: 860px; }
  thead th{ padding: 10px 10px; }
  tbody td{ padding: 10px 10px; }
}

@media (max-width: 420px){
  .report-inner{ padding: 12px; }
  .control-grid{ grid-template-columns: 1fr; }
}

/* =========================
   Battery color states
   <50% red, 50-75% yellow, 75-100% green
========================= */
.battery.high{ border-color: rgba(34,197,94,.75); }
.battery.high:before{ border-color: rgba(34,197,94,.75); }
.battery.high .bar.on{ background: #22C55E; }

.battery.mid{ border-color: rgba(245,158,11,.75); }
.battery.mid:before{ border-color: rgba(245,158,11,.75); }
.battery.mid .bar.on{ background: #F59E0B; }

.battery.low{ border-color: rgba(239,68,68,.75); }
.battery.low:before{ border-color: rgba(239,68,68,.75); }
.battery.low .bar.on{ background: #EF4444; }

/* =========================
   Desktop alignment fixes for metric cards
========================= */
.status-strip, .status-cards, .status-row{
  align-items: stretch;
}

.status-block.frame-card{
  display: flex;
  flex-direction: column;
}

.status-center{
  flex: 1 1 auto;
}

.status-bottom, .metric-rows{
  flex: 0 0 auto;
}



/* Simple title divider bar */


/* Simple title divider bar (final) */
.status-line{
  width: 90px;              /* longer to fit title */
  height: 3px;              /* slim rectangle */
  margin: 8px auto 14px;    /* centered */
  border-radius: 2px;       /* subtle rounding */
  background: #102e4b !important; /* header blue */
  box-shadow: none !important;
  background-image: none !important;
}

/* =========================
   v7 Overrides: solid divider + consistent card spacing + better mobile fit
========================= */

/* Force divider bar solid, no gradient */
.status-line{
  background: #102e4b !important;
  background-image: none !important;
  box-shadow: none !important;
  filter: none !important;
}

/* Metric cards: consistent vertical rhythm */
.status-block.frame-card{
  display:flex;
  flex-direction:column;
}

.status-center{
  flex: 1 1 auto;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 14px 0 10px;
  min-height: 110px; /* keeps icon-to-bottom spacing consistent */
}

.status-bottom,
.metric-rows{
  padding: 0 18px 16px;
}

/* Align label + value spacing consistently */
.status-bottom{
  display:flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.status-bottom .stat-label,
.status-bottom .label{
  margin:0 !important;
  padding:0 !important;
}

.status-bottom .stat-value,
.status-bottom .value{
  margin:0 !important;
  padding:0 !important;
  text-align:right;
  font-variant-numeric: tabular-nums;
}

/* Recovery + other metric rows */
.metric-row,
.rpe-row{
  display:flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.metric-row .label,
.metric-row .value,
.rpe-row .label,
.rpe-row .value{
  margin:0 !important;
  padding:0 !important;
  font-variant-numeric: tabular-nums;
}

/* Desktop: ensure cards align in a row and don't overlap */
.status-strip, .status-row, .status-cards{
  align-items: stretch;
}
.status-block:hover{ z-index: 20000; }

/* Mobile: cards should fit the screen nicely */
@media (max-width: 720px){
  .status-strip{
    display:grid !important;
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  /* Reduce side padding so cards fit without horizontal scroll */
  .report-inner,
  .report,
  .page,
  .container{
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .status-center{
    min-height: 96px;
    padding: 12px 0 8px;
  }
}

/* Internal Load / other panels: ensure card grids wrap on mobile */
@media (max-width: 900px){
  .chips,
  .nav-tabs,
  .tabs{
    flex-wrap: wrap;
  }
}


/* =========================
   v8: Title underline + consistent card spacing (desktop+mobile)
========================= */

/* Title underline: solid, longer, matches title area */
.status-line{
  background: #102e4b !important;
  background-image: none !important;
  box-shadow: none !important;
  height: 3px !important;
  width: 62% !important;
  max-width: 170px !important;
  min-width: 110px !important;
  margin: 10px auto 12px auto !important;
  border-radius: 0 !important; /* rectangle */
}

/* Keep title block the same height so underline aligns across cards */
.status-title{
  min-height: 22px !important;
  margin-top: 6px !important;
}

/* Make all KPI/metric cards follow same vertical rhythm */
.status-block.frame-card{
  padding-bottom: 0 !important;
}

.status-center{
  /* consistent distance from underline to icon */
  padding: 18px 0 12px !important;
  min-height: 120px !important;
}

/* Footer area consistent */
.status-bottom,
.metric-rows{
  padding: 0 18px 18px !important;
}

/* Score rows: same spacing between label and value everywhere */
.status-bottom,
.metric-row,
.rpe-row{
  display:flex !important;
  justify-content: space-between !important;
  align-items: baseline !important;
  gap: 18px !important;
}

.status-bottom .stat-label,
.metric-row .label,
.rpe-row .label{
  flex: 0 0 auto;
}

.status-bottom .stat-value,
.metric-row .value,
.rpe-row .value{
  flex: 0 0 auto;
  text-align: right !important;
  font-variant-numeric: tabular-nums;
}

/* SRPE: make its block footer spacing match even with 2 rows */
.rpe-rows{
  padding: 0 18px 18px !important;
}

/* =========================
   Internal Load: mobile cards fit like dashboard
========================= */
@media (max-width: 720px){
  .kpi-strip{
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
  .kpi-card{
    width: 100% !important;
  }
}

/* =========================
   v10: Clean metric-card styling (no HTML inline overrides)
========================= */

/* Tooltip "i" (hover/focus) */
.info-i{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:18px;
  height:18px;
  border-radius:999px;
  font-size:11px;
  font-weight:800;
  text-transform:none;
  color:#102e4b;
  background:rgba(16,46,75,.10);
  border:1px solid rgba(16,46,75,.22);
  cursor:help;
  user-select:none;
  position: relative;
}

.info-i::after{
  content: attr(data-tip);
  position:absolute;
  left: 50%;
  top: calc(100% + 10px);
  transform: translateX(-90%);
  width: min(240px, 70vw);
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,.98);
  color: #0F172A;
  border: 1px solid rgba(226,232,240,.95);
  box-shadow: 0 18px 40px rgba(2,6,23,.22);
  opacity: 0;
  pointer-events: none;
  transition: opacity .12s ease;
  z-index: 999999;
  white-space: normal;
  line-height: 1.25;
}

.info-i::before{
  content:"";
  position:absolute;
  left: 50%;
  top: calc(100% + 3px);
  transform: translateX(-90%);
  border: 7px solid transparent;
  border-top-color: rgba(255,255,255,.98);
  opacity: 0;
  transition: opacity .12s ease;
  z-index: 999999;
}

.info-i:hover::after,
.info-i:focus::after,
.info-i:hover::before,
.info-i:focus::before{
  opacity: 1;
}

/* Keep tooltip above neighbors */
.status-block.frame-card{ position: relative; z-index: 1; overflow: visible; }
.status-block.frame-card:hover{ z-index: 20000; }

/* Solid divider bar: EXACT color, no gradient */
.status-line{
  width: clamp(90px, 55%, 150px);
  height: 3px;
  margin: 8px auto 12px;
  border-radius: 0;
  background: #102e4b !important;
  background-image: none !important;
  box-shadow: none !important;
  opacity: 1 !important;
}

/* Card rhythm */
.status-block.frame-card{
  display:flex;
  flex-direction:column;
}

.status-title{
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
  text-align:center;
  margin-top: 10px;
  min-height: 22px;
}

.status-center{
  flex: 1 1 auto;
  display:flex;
  align-items:center;
  justify-content:center;
  min-height: 120px;
  padding: 14px 0 8px;
}

.status-bottom,
.metric-rows{
  padding: 0 18px 18px;
  min-height: 44px;
}

/* Center the "Score  83/100" row (all cards) */
.status-bottom{
  display:flex;
  align-items: baseline;
  justify-content: center;
  gap: 14px;
}

.metric-row,
.rpe-row{
  display:flex;
  align-items: baseline;
  justify-content: center;
  gap: 14px;
}

/* Unified typography */
.status-bottom .stat-label,
.metric-row .label,
.rpe-row .label{
  margin:0;
  padding:0;
  color: #64748B;
  font-weight: 600;
}

.status-bottom .stat-value,
.metric-row .value,
.rpe-row .value{
  margin:0;
  padding:0;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  color: #0F172A;
}

/* Internal Load mobile: cards fit screen like dashboard */
@media (max-width: 720px){
  .status-strip{
    display:grid;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .report-inner, .report, .page, .container{
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
}
